<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div style="font-size:10px;" onclick="changeSize()">点我放大</div>
</body>

<script>
    function changeSize()
    {
        let elem=document.querySelector('div')
        //console.log(elem.style)

        let size=parseInt(elem.style.fontSize)+10;
        //elem.style.fontSize=size+"px";
        elem.style.cssText="font-size:"+size+"px"

        //console.log(typeof(size))
    }
</script>
</html>